<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>03-axios的介绍与页面配置</title>
    <!-- 这样即可引入axios -->
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/1.3.4/axios.js"></script>
</head>

<body>
    <button>GET</button>
    <button>POST</button>
    <button>PUT</button>
    <button>DELETE</button>

    <script>
        // 贴一个get请求的相应结果示例供参考
        let obj = {
            "data": {
                "status": "get success"
            },
            "status": 200,
            "statusText": "OK",
            "headers": {
                "content-length": "24",
                "content-type": "application/json; charset=utf-8"
            },
            "config": {
                "transitional": {
                    "silentJSONParsing": true,
                    "forcedJSONParsing": true,
                    "clarifyTimeoutError": false
                },
                "adapter": [
                    "xhr",
                    "http"
                ],
                "transformRequest": [
                    null
                ],
                "transformResponse": [
                    null
                ],
                "timeout": 0,
                "xsrfCookieName": "XSRF-TOKEN",
                "xsrfHeaderName": "X-XSRF-TOKEN",
                "maxContentLength": -1,
                "maxBodyLength": -1,
                "env": {},
                "headers": {
                    "Accept": "application/json, text/plain, */*"
                },
                "method": "get",
                "url": "http://localhost:10086/demo/demoGet"
            },
            "request": {}
        }
    </script>
</body>

</html>